<?php
/**
  * 操作员列表
  * operatorList.php
  * 模板文件：operatorList.html
  */
include_once("global.php");
include_once("functions/operator.php");

$operator = new operator;

//$DB->debug = true;
//取得参数
$show 	= $_REQUEST["show"];
$act	= $_REQUEST["act"];
$op_id	= $_REQUEST["op_id"];
//

if($act == 2){
	$operator->operator_del($op_id);
}

//模板设置
$smarty = $COMMON->template_init();

$rs = $operator->list_operator();
while(!$rs->EOF){	
	$actstr = "";
	//$actstr .= '<a href=""  class="link_c_01">修改</a><br>';
	$actstr .= '<a href="?act=2&op_id='.$rs->fields["mi_id"].'" onclick="javascript:return cfmMsg(\'确认要删除吗？\');">删除</a>';
	$op_list[] = array(
		"id"		=> $rs->fields["mi_id"],
		"code"		=> $rs->fields["mi_code"],
		"user"		=> $rs->fields["mi_user"],
		"name"		=> $rs->fields["mi_name"],
		"type"		=> $GLOBAL['DATA']->opType[$rs->fields["mi_type"]],
		"email"		=> $rs->fields["mi_email"],
		"status"	=> $GLOBAL['DATA']->opStatus[$rs->fields["mi_status"]],
		"actsrt"	=> $actstr, 
		"logintime"	=> $rs->fields["mi_date_login"],	
		);    	
	$rs->MoveNext();
}

$smarty -> assign(array(
			"op_list"	 => $op_list,
		));
$smarty->display("operatorList.html");
?>